<%--                                                                       --%>
<%-- Copyright (c) 2003-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<script language="JavaScript">

function doCancel(theForm) {
  theForm.reset();
  theForm.action = '<html:rewrite page="/bp/packageView.do"/>';
  theForm.submit();
  return false;
}

</script>

<% 
  java.util.HashMap map = new java.util.HashMap();
  String packageId = request.getParameter("id"); 
  map.put("id", packageId);
  pageContext.setAttribute("pagetabParam", map, PageContext.PAGE_SCOPE);
%>

<!-- Zone 5 starts here.  -->

<html:javascript formName="packageEditForm"/>

<html:form action="/bp/packageSave.do" onsubmit="return validatePackageEditForm(this);">

<input type="hidden" name="id" value="<bean:write name="packageDetailView" property="pkg.id" />" />

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="<bean:message key="bp.package.contentArea" bundle="bp.messages"/>">
  <tr>
    <td valign="top" width="100%">
		    
      <div class="pageTitle">
        <bean:write name="packageDetailView" property="pkg.name" />
      </div> 
			
      <!-- pageTab -->
      <div class="errorMessage"><html:errors bundle="bp.messages"/></div>
      <%@include file="/mc/common/pagetab.jsp" %>
      <!-- end of PageTab -->
			
      <div class="pageSubtitle">
        <span class="left"><bean:message key="bp.package.detail" bundle="bp.messages"/></span>
      </div> 

      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="<bean:message key="bp.package.contentArea" bundle="bp.messages"/>">
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.packageName" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <bean:write name="packageDetailView" property="pkg.name"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.packageDescription" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
            <textarea cols="50" rows="5" name="description"
wrap="virtual"><bean:write name="packageDetailView"
property="pkg.description"/> </textarea>

          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.packageStatus" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <logic:equal name="packageEditForm" property="status" value="0"> 
              <html:select name="packageEditForm" property="status">
                <html:option key="bp.package.status.offline" value="0" bundle="bp.messages"/>
                <html:option key="bp.package.status.online" value="1" bundle="bp.messages"/>
              </html:select>
            </logic:equal>
	    <logic:equal name="packageEditForm" property="status" value="1"> 
              <html:select name="packageEditForm" property="status">
                <html:option key="bp.package.status.offline" value="0" bundle="bp.messages"/>
                <html:option key="bp.package.status.online" value="1" bundle="bp.messages"/>
              </html:select>
            </logic:equal>
	    <logic:equal name="packageEditForm" property="status" value="3"> 
              <html:select name="packageEditForm" property="status">
                <html:option key="bp.package.status.online" value="1" bundle="bp.messages"/>
                <html:option key="bp.package.status.toBeConfig" value="3" bundle="bp.messages"/>
              </html:select>
            </logic:equal>
          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.createdDate" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <bean:write name="packageDetailView" property="pkg.creationTime"  formatKey="format.datetime.long" bundle="mc.messages"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.lastModifiedDate" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <bean:write name="packageDetailView" property="pkg.lastModTime"  formatKey="format.datetime.long" bundle="mc.messages"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.deployer" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <bean:write name="packageDetailView" property="pkg.deployer"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="20%"><bean:message key="bp.package.packageVersion" bundle="bp.messages"/>:</td>
          <td class="labelField" width="80%">
	    <bean:write name="packageDetailView" property="pkg.userInputVersion"/>
          </td>
        </tr>
      </table>

      <div class="pageButtonWrap" align="right">
        <html:reset styleClass="pageButton"  titleKey="button.reset">
          <bean:message key="button.reset" bundle="bp.messages"/>    
        </html:reset>       
        <html:button property="cancelBtn" styleClass="pageButton" onclick="javascript:doCancel(this.form);" >
          <bean:message key="button.cancel" bundle="bp.messages"/>
        </html:button>
        <html:submit styleClass="pageButton">
          <bean:message key="button.save" bundle="bp.messages"/>
        </html:submit>
      </div>
    </td>
  </tr>
</table>

</html:form>

<!--end zone 5 content here -->

